short trick to find remainder